<!DOCTYPE html>
<html lang="en">
<head>

	<meta charset="utf-8">
	<title>RomyShop Administrator</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
	<meta name="author" content="Muhammad Usman">

	<?php
		echo $this->Html->meta('icon');
		echo $this->Html->css('bootstrap-cerulean.css');
		// jQuery
		echo $this->Html->script('jquery-1.7.2.min.js');
		
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
	?>
	<!-- The default styles -->
	<style type="text/css">
	  body {
		padding-bottom: 40px;
	  }
	  .sidebar-nav {
		padding: 9px 0;
	  }
	</style>
	<?php
		// style for js 
		echo $this->Html->css('custom.css');
		echo $this->Html->css('bootstrap-responsive.css');
		echo $this->Html->css('charisma-app.css');
		echo $this->Html->css('jquery-ui-1.8.21.custom.css');
		echo $this->Html->css('fullcalendar.css');
		echo $this->Html->css('fullcalendar.print.css');
		echo $this->Html->css('chosen.css');
		echo $this->Html->css('uniform.default.css');
		echo $this->Html->css('colorbox.css');
		echo $this->Html->css('jquery.cleditor.css');
		echo $this->Html->css('jquery.noty.css');
		echo $this->Html->css('noty_theme_default.css');
		echo $this->Html->css('elfinder.min.css');
		echo $this->Html->css('elfinder.theme.css');
		echo $this->Html->css('jquery.iphone.toggle.css');
		echo $this->Html->css('opa-icons.css');
		echo $this->Html->css('uploadify.css');	
	?>	
	<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js');
	<![endif]-->

	<!-- The fav icon -->
</head>
<body>
	<div id="upload-photo-loading">
		<?php echo $this->Html->image('ajax-loaders/ajax-loader.gif');?>	
	</div>	 
	<?php if ($this->Session->read('Auth.User')): ?>
	<!-- topbar starts -->
	<div class="navbar">
		<div class="navbar-inner">
			<div class="container-fluid">
				<a class="btn btn-navbar" data-toggle="collapse" data-target=".top-nav.nav-collapse,.sidebar-nav.nav-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</a>
								
				<!-- user dropdown starts -->
				<div class="btn-group pull-right" >
					<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						<i class="icon-user"></i><span class="hidden-phone">
						<?php 
							$user = $this->Session->read('Auth.User');
							echo $user['username'];
						?>
					</span>
						<span class="caret"></span>
					</a>
					<ul class="dropdown-menu">
						<li><a href="<?php echo $this->Html->url(array('controller' => 'users', 'action' => 'edit', $user['id'], 'admin' => true));?>">Change Password</a></li>
						<li class="divider"></li>
						<li><a href="<?php echo $this->Html->url(array('controller' => 'users', 'action' => 'logout', 'admin' => true));?>">Logout</a></li>
					</ul>
				</div>
				<!-- user dropdown ends -->
				
				<div class="top-nav nav-collapse">
					<ul class="nav">
						<li><a href="#">Visit Site</a></li>
					</ul>
				</div><!--/.nav-collapse -->
			</div>
		</div>
	</div>
	<!-- topbar ends -->
	<?php endif;?>

	<div class="container-fluid">
		<div class="row-fluid">	
			<?php if ($this->Session->read('Auth.User')): ?>
			<!-- left menu starts -->
			<div class="span2 main-menu-span">
				<div class="well nav-collapse sidebar-nav">
					<ul class="nav nav-tabs nav-stacked main-menu">
						<li class="nav-header hidden-tablet">Main</li>
						<li><a class="ajax-link" href="<?php echo $this->Html->url(array('controller' => 'albums', 'action' => 'home', 'admin' => true));?>"><i class="icon-home"></i><span class="hidden-tablet"> Dashboard</span></a></li>
						<li><a class="ajax-link" href="<?php echo $this->Html->url(array('controller' => 'users', 'action' => 'index', 'admin' => true));?>"><i class="icon-user"></i><span class="hidden-tablet"> Users</span></a></li>
						<li><a class="ajax-link" href="<?php echo $this->Html->url(array('controller' => 'categories', 'action' => 'index', 'admin' => true));?>"><i class="icon-list"></i><span class="hidden-tablet"> Categories</span></a></li>
						<li><a class="ajax-link" href="<?php echo $this->Html->url(array('controller' => 'albums', 'action' => 'index', 'admin' => true));?>"><i class="icon-book"></i><span class="hidden-tablet"> Albums</span></a></li>
						<li><a class="ajax-link" href="<?php echo $this->Html->url(array('controller' => 'items', 'action' => 'index', 'admin' => true));?>"><i class="icon-tags"></i><span class="hidden-tablet"> Items</span></a></li>
						<li><a class="ajax-link" href="<?php echo $this->Html->url(array('controller' => 'images', 'action' => 'index', 'admin' => true));?>"><i class="icon-camera"></i><span class="hidden-tablet"> Images</span></a></li>
						<li><a class="ajax-link" href="<?php echo $this->Html->url(array('controller' => 'banners', 'action' => 'index', 'admin' => true));?>"><i class="icon-picture"></i><span class="hidden-tablet"> Banners</span></a></li>
					</ul>
				</div><!--/.well -->
			</div><!--/span-->
			<!-- left menu ends -->
				
			<div id="content" class="span10">
			<!-- content starts -->
			<?php endif;?>
			
			<?php if ($this->Session->read('Auth.User')): ?> 
				<?php echo $this->element('breadcrumb');?>
			<?php endif;?>
										 
			<?php echo $this->fetch('content'); ?>
			<?php if ($this->Session->read('Auth.User')): ?>
			<!-- content ends -->
			</div><!--/#content.span10-->
			<?php endif;?>
		</div><!--/fluid-row-->
	</div><!--/.fluid-container-->
	<?php 
		// external javascript
		// Placed at the end of the document so the pages load faster -->
		// jQuery UI -->
		echo $this->Html->script('jquery-ui-1.8.21.custom.min.js');
		// transition / effect library -->
		echo $this->Html->script('bootstrap-transition.js');
		// alert enhancer library -->
		echo $this->Html->script('bootstrap-alert.js');
		// modal / dialog library -->
		echo $this->Html->script('bootstrap-modal.js');
		// custom dropdown library -->
		echo $this->Html->script('bootstrap-dropdown.js');
		// scrolspy library -->
		echo $this->Html->script('bootstrap-scrollspy.js');
		// library for creating tabs -->
		echo $this->Html->script('bootstrap-tab.js');
		// library for advanced tooltip -->
		echo $this->Html->script('bootstrap-tooltip.js');
		// popover effect library -->
		echo $this->Html->script('bootstrap-popover.js');
		// button enhancer library -->
		echo $this->Html->script('bootstrap-button.js');
		// accordion library (optional, not used in demo) -->
		echo $this->Html->script('bootstrap-collapse.js');
		// carousel slideshow library (optional, not used in demo) -->
		echo $this->Html->script('bootstrap-carousel.js');
		// autocomplete library -->
		echo $this->Html->script('bootstrap-typeahead.js');
		// tour library -->
		echo $this->Html->script('bootstrap-tour.js');
		// library for cookie management -->
		echo $this->Html->script('jquery.cookie.js');
		// calander plugin -->
		echo $this->Html->script('fullcalendar.min.js');
		// data table plugin -->
		echo $this->Html->script('jquery.dataTables.min.js');
	
		// chart libraries start -->
		echo $this->Html->script('excanvas.js');
		echo $this->Html->script('jquery.flot.min.js');
		echo $this->Html->script('jquery.flot.pie.min.js');
		echo $this->Html->script('jquery.flot.stack.js');
		echo $this->Html->script('jquery.flot.resize.min.js');
		// chart libraries end -->
	
		// select or dropdown enhancer -->
		echo $this->Html->script('jquery.chosen.min.js');
		// checkbox, radio, and file input styler -->
		echo $this->Html->script('jquery.uniform.min.js');
		// plugin for gallery image view -->
		echo $this->Html->script('jquery.colorbox.min.js');
		// rich text editor library -->
		echo $this->Html->script('jquery.cleditor.min.js');
		// notification plugin -->
		echo $this->Html->script('jquery.noty.js');
		// file manager library -->
		echo $this->Html->script('jquery.elfinder.min.js');
		// star rating plugin -->
		echo $this->Html->script('jquery.raty.min.js');
		// for iOS style toggle switch -->
		echo $this->Html->script('jquery.iphone.toggle.js');
		// autogrowing textarea plugin -->
		echo $this->Html->script('jquery.autogrow-textarea.js');
		// multiple file upload plugin -->
		echo $this->Html->script('jquery.uploadify-3.1.min.js');
		// history.js for cross-browser state change on ajax -->
		echo $this->Html->script('jquery.history.js');
		// application script for Charisma demo -->
		echo $this->Html->script('charisma.js');
		// customized js
		echo $this->Html->script('custom.js');
	?>
<?php if($this->Session->check("Message.flash"))
	echo $this->Session->flash('flash', array('element' => 'flash'));?>
</body>
</html>			